import React, { Component } from 'react';
import { connect } from 'dva';

@connect(state => ({
  msg1: state.all.name,
  msg2: state.login.name
}))
class Login extends Component {
  constructor(props) {
    super(props)
    this.state = {
      msg: '我是登录页面'
    }
  }
  render() {
    return (
      <div>
        <h1>{this.state.msg}</h1>
        <p>{this.props.msg1}</p>
        <p>{this.props.msg2}</p>
      </div>
    );
  }
}

export default Login